﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using Microhard.Plat.CRM.Customers.Validator;


namespace Microhard.Plat.CRM.Customers.Models
{
    [FluentValidation.Attributes.Validator(typeof(SaleLeadModelValidator))]
    public class SaleLeadModel : BasePermissionModel
    {
        [ModelPKID]
        public Guid SaleLeadID { set; get; }
        public Guid LeadType { set; get; }
        [ModelReadTxtFromoCache(IDFieldName = "LeadType")]
        public string LeadTypeDisplay { set; get; }
        public string Description { set; get; }
        public DateTime CreateTime { set; get; }
        public Guid CustomerID { set; get; }
        public bool Status { set; get; }
        [ModelReadTxtFromoCache(IDFieldName = "GetPrdInfoResource")]
        public string GetPrdInfoResourceDisplay { set; get; }
        public Guid GetPrdInfoResource { set; get; }
        [ModelReadTxtFromoCache(IDFieldName = "ReqTimeLine")]
        public string ReqTimeLineDisplay { set; get; }
        public Guid ReqTimeLine { set; get; }
        [ModelReadTxtFromoCache(IDFieldName = "LeadSourceType")]
        public string LeadSourceTypeDisplay { set; get; }
        public Guid LeadSourceType { set; get; }
        public Guid OldCustomerID { set; get; }
        public CustomerModel IntrOldCustomer { set; get; }
        public CustomerModel Customer { set; get; }

        public SaleLeadModel()
        {
            this.IntrOldCustomer = new CustomerModel();
            this.Customer = new CustomerModel();
        }
    }
}
